﻿<!DOCTYPE HTML>
<html>
<head>
    <title>Register</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link href="css/style.css" rel="stylesheet" type="text/css" media="all"/>
    <link href='http//fonts.googleapis.com/css?family=Exo+2' rel='stylesheet' type='text/css'>
    <script type="text/javascript" src="js/jquery1.min.js"></script>
    <script src="js/jquery.cookie.js"></script>
    <!-- start menu -->
    <link href="css/megamenu.css" rel="stylesheet" type="text/css" media="all"/>
    <script type="text/javascript" src="js/megamenu.js"></script>
    <script>$(document).ready(function () {
        $(".megamenu").megamenu();
        // 添加头
        $(".header").load("head.html");
    });</script>
    <script src="js/jquery.easydropdown.js"></script>
</head>
<body>
<div class="header"></div>

<div class="register_account">
    <div class="wrap">
        <div class="col_1_of_login span_1_of_login">
            <div class="login-title">
                <h4 class="title">注册</h4>
                <div id="registbox" class="loginbox">
                    <!--<form method="post" name="login" id="login-form">-->
                    <fieldset class="input">
                        <p id="regist-form-username">
                            <label for="modlgn_username">账号</label>
                            <input id="modlgn_username" type="text" name="username" class="inputbox" size="18"
                                   autocomplete="off">
                        </p>
                        <p id="login-form-password">
                            <label for="modlgn_passwd">密码</label>
                            <input id="modlgn_passwd" type="password" name="password" class="inputbox" size="18"
                                   autocomplete="off"></br>
                        </p>
                        <p id="regist-form-qq">
                            <label for="modlgn_qq">Q Q</label>
                            <input id="modlgn_qq" type="text" name="qq" class="inputbox" size="18"
                                   autocomplete="off">
                        </p>
                        <p id="regist-form-name">
                            <label for="modlgn_name">姓名</label>
                            <input id="modlgn_name" type="text" name="name" class="inputbox" size="18"
                                   autocomplete="off">
                        </p>
                        <p id="regist-form-telephone">
                            <label for="modlgn_telephone">联系电话</label>
                            <input id="modlgn_telephone" type="text" name="telephone" class="inputbox" size="18"
                                   autocomplete="off">
                        </p><br>
                        <p id="upload-form-leibie">
                        <p>性别</p>
                        <select id="modlgn_sex">
                            <option value="1" name="sex">男</option>
                            <option value="0" name="sex">女</option>
                        </select></br>
                        </p>
                        <div><span id="errorInfo" hidden="hidden" style="color: red"></span><br></div>
                        <button class="grey" onclick="registe()">注册</button>
                    </fieldset>
                    <!--</form>-->
                </div>
            </div>
        </div>
    </div>
    <!--<p class="terms">By clicking 'Create Account' you agree to the <a href="#">Terms &amp; Conditions</a>.</p>-->
    <div class="clear"></div>
    <script type="text/javascript">
        function registe() {
            $.ajax({
                url: "user/register.do",
                type: "POST",
                data: {
                    username: $("#modlgn_username").val(),
                    password: $("#modlgn_passwd").val(),
                    qq: $("#modlgn_qq").val(),
                    name: $("#modlgn_name").val(),
                    telephone: $("#modlgn_telephone").val(),
                    sex: $("#modlgn_sex").val(),
                },
                dataType: "json",
                cache: false,
                success: function (data) {
                    if (data.success) {
                        if (confirm("注册成功是否跳转登录页面？")) {
                            window.location.href = "login.html";
                        }
                        window.location.href = "index.html";
                    } else {
                        $("#errorInfo").html(data.message);
                        $("#errorInfo").show();
                    }
                }
            });
        }
    </script>
</div>
</div>
<div class="footer">
    <div class="footer-bottom">
        <div class="wrap">
            <div class="copy">
                <p>Copyright &copy; 2014.Company name All rights reserved.<a target="_blank"
                                                                             href="http//www.zjf88.com/">&#x7F51;&#x9875;&#x6A21;&#x677F;</a>
                </p>
            </div>
            <div class="f-list2">
                <ul>
                    <li class="active"><a href="about.html">关于我们</a></li>
                    |
                    <li><a href="delivery.html">服务条款</a></li>
                    |
                    <li><a href="contact.html">联系我们</a></li>
                </ul>
            </div>
            <div class="clear"></div>
        </div>
    </div>
</div>
<div style="display:none">
    <script src='http//v7.cnzz.com/stat.php?id=155540&web_id=155540' language='JavaScript' charset='gb2312'></script>
</div>
</body>
</html>